package com.zhuangjie.shop.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 商品分类
 * </p>
 *
 * @author zhuangjie
 * @since 2023-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dish_category")
@ApiModel(value="DishCategory对象", description="商品分类")
public class DishCategory implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "分类id")
      @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "商家/商店_店铺id")
    @TableField("shop_id")
    private Long shopId;

    @ApiModelProperty(value = "分类名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "排序字段")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty(value = "状态")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @ApiModelProperty(value = "逻辑删除")
    @TableField(value = "deleted",fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;

    /**
     * 菜品列表（不属于表字段）
     */
    @TableField(exist = false)
    private List<Dish> dishList;

}
